package jtk.project4.fleet.field;

import java.awt.Dimension;
import jtk.project4.fleet.domain.Employee;
import nl.coderight.jazz.form.FormLayout;
import nl.coderight.jazz.form.FormLayout.Align;
import nl.coderight.jazz.form.control.GroupControl;
import nl.coderight.jazz.form.field.SelectField;

public class UpdateMeterSelectField extends GroupControl<Employee>{
	private SelectField locationField;
	private SelectField categoryField;
	
	
	
	public UpdateMeterSelectField(String bindID){
		setBindID(bindID);
		createFields();
		createLayout();
	}

	private void createFields() {
		// TODO Auto-generated method stub
	
		locationField = new SelectField<String>("employees","location");
		locationField.setPreferredSize(new Dimension(250,20));
		categoryField = new SelectField<String>("employees","category");
		categoryField.setPreferredSize(new Dimension(250,20));
	}
	
	private void createLayout() {
		// TODO Auto-generated method stub
		setLayout(new FormLayout())

		.addLabel("Location", Align.LEFT)	.addLabel("Category", Align.LEFT)
		.addRow()	
		
		.addField(locationField)	.addField(categoryField)
		.addRow();
	}
	
}
